import { get, post, put, del } from "../utils/request";

/**
 *
 *
 * @export
 * @param {number} [page=1]
 * @returns
 */
export function ListApi(page = 1) {
    return get("/api/v1/admin/products", { page });
}

export function createApi(data) {
    return post("/api/v1/admin/products", data);
}

export function modifyOne(id, data) {
    return put(`/api/v1/admin/products/${id}`, data);
}

export function delOne(id, data) {
    return del(`/api/v1/admin/products/${id}`);
}
